/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.androidpublisher.model;

/**
 * Details relating to any Play Points applied to an order.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Play Android Developer API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class PointsDetails extends com.google.api.client.json.GenericJson {

  /**
   * The monetary value of a Play Points coupon. This is the discount the coupon provides, which may
   * not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100
   * points for $2 coupon, this is $2.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Money pointsCouponValue;

  /**
   * The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points
   * for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points
   * required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long pointsDiscountRateMicros;

  /**
   * ID unique to the play points offer in use for this order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String pointsOfferId;

  /**
   * The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is
   * 100. For coupon stacked with base offer, this is the total points spent across both.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long pointsSpent;

  /**
   * The monetary value of a Play Points coupon. This is the discount the coupon provides, which may
   * not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100
   * points for $2 coupon, this is $2.
   * @return value or {@code null} for none
   */
  public Money getPointsCouponValue() {
    return pointsCouponValue;
  }

  /**
   * The monetary value of a Play Points coupon. This is the discount the coupon provides, which may
   * not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100
   * points for $2 coupon, this is $2.
   * @param pointsCouponValue pointsCouponValue or {@code null} for none
   */
  public PointsDetails setPointsCouponValue(Money pointsCouponValue) {
    this.pointsCouponValue = pointsCouponValue;
    return this;
  }

  /**
   * The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points
   * for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points
   * required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000.
   * @return value or {@code null} for none
   */
  public java.lang.Long getPointsDiscountRateMicros() {
    return pointsDiscountRateMicros;
  }

  /**
   * The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points
   * for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points
   * required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000.
   * @param pointsDiscountRateMicros pointsDiscountRateMicros or {@code null} for none
   */
  public PointsDetails setPointsDiscountRateMicros(java.lang.Long pointsDiscountRateMicros) {
    this.pointsDiscountRateMicros = pointsDiscountRateMicros;
    return this;
  }

  /**
   * ID unique to the play points offer in use for this order.
   * @return value or {@code null} for none
   */
  public java.lang.String getPointsOfferId() {
    return pointsOfferId;
  }

  /**
   * ID unique to the play points offer in use for this order.
   * @param pointsOfferId pointsOfferId or {@code null} for none
   */
  public PointsDetails setPointsOfferId(java.lang.String pointsOfferId) {
    this.pointsOfferId = pointsOfferId;
    return this;
  }

  /**
   * The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is
   * 100. For coupon stacked with base offer, this is the total points spent across both.
   * @return value or {@code null} for none
   */
  public java.lang.Long getPointsSpent() {
    return pointsSpent;
  }

  /**
   * The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is
   * 100. For coupon stacked with base offer, this is the total points spent across both.
   * @param pointsSpent pointsSpent or {@code null} for none
   */
  public PointsDetails setPointsSpent(java.lang.Long pointsSpent) {
    this.pointsSpent = pointsSpent;
    return this;
  }

  @Override
  public PointsDetails set(String fieldName, Object value) {
    return (PointsDetails) super.set(fieldName, value);
  }

  @Override
  public PointsDetails clone() {
    return (PointsDetails) super.clone();
  }

}
